package com.zgjkhis.modules.system.service;

import com.zgjkhis.common.service.BaseService;
import com.zgjkhis.domain.PageResult;
import com.zgjkhis.modules.system.domain.DrugDelivery;
import com.zgjkhis.modules.system.service.dto.DrugDeliveryQueryCriteria;
import com.zgjkhis.modules.system.service.dto.DrugQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.ParseException;

/**
 * @Author yzq
 * @Description 药品出入
 * @Date 2021/6/23 9:45
 * @Param
 * @return
 **/
public interface DrugDeliveryService extends BaseService<DrugDelivery>{


    /**
     * @Author yzq
     * @Description 新增出库
     * @Date 2021/6/28 10:33
     * @Param [drugWareHousing]
     * @return boolean
     **/
    boolean createDrugWareHousing(DrugDelivery drugDelivery);

    /**
     * @Author yzq
     * @Description 分页查询出库信息
     * @Date 2021/6/28 14:51
     * @Param [criteria, pageable]
     * @return java.lang.Object
     **/
    PageResult<DrugDelivery> findAllByPageable(DrugDeliveryQueryCriteria criteria, Pageable pageable);

    void outTemplate(DrugQueryCriteria criteria, HttpServletResponse response) throws IOException;

    void inTemplate(MultipartFile file, Integer deliveryType, String collectDeptId, String collectUseId, String remark, String collectDeptName, String collectUseName,Integer drugType) throws IOException, ParseException;

    void outDelivery(String id, HttpServletResponse response) throws IOException;

}
